<?php

class TestController extends AdminController {

    public function init() {
        parent::init();
        $this->mediaConfig = 'lesson';        
    }
    public function actionIndex(){
        $model = new AuthItem();
        $model->description ="Description available";
        $this->render('index', array(
          'model' => $model,
        ));
    }
    
     public function actionGetTooltip($id){
        $str = "<div style=''>This is Tooltip (HTML support) for " . $id ."!</div>";
        echo $str;
    }
    
    public function actionFile(){
       $this->render('file');
    }
     
    public function actionBrowse(){
        Yii::app()->clientScript->scriptMap['jquery.js'] = false;
        $this->renderPartial('_file_browser',null,false,true);
    }
    
    function actions() {
        return array(
            'create' => array(
                'class' => 'lib.components.actions.CreateAction',
                'modelClass' => 'User',
                //'redirectTo' => url('/dashboard/index'),
                'messages' => array('success' => t('MSG_INFO_INSERT_SUCCESS', 'messages', array('{0}' => 'User')))
            ),
            'update' => array(
                'class' => 'lib.components.actions.UpdateAction',
                'modelClass' => 'User',
                //'redirectTo' => url('/dashboard/index'),
                'messages' => array('success' => t('MSG_INFO_UPDATE_SUCCESS', 'messages', array('{0}' => 'User')))
            ),
        );
    }
}
